
// 表格查询公共抽取

export default {
  data() {
    return {
      loading: false,
      pagination: { // 分页参数
        showTotal: total => `共 ${total} 条数据`,
        showSizeChanger: true,
        current: 1,
        pageSize: 10,
        defaultPageSize: 10,
        pageSizeOptions: ['5', '10', '20', '50', '100']
      },
      tagList: [], // 高级筛选的条件数据
      // 表格选中数据
      selectedRowKeys: [],
      selectedRows: [],
    };
  },
  methods: {
    tableChange({ current, pageSize }) {
      this.pagination.current = current;
      this.pagination.pageSize = pageSize;
    },
    onSelectChange(selectedRowKeys, selectedRows) {
      this.selectedRowKeys = selectedRowKeys;
      this.selectedRows = selectedRows;
    },
    onSelectClear() {
      this.selectedRowKeys = [];
      this.selectedRows = [];
    }
  }
};
